<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
 <head>
   <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  <script type="text/javascript">
  //编写自定义JS代码
  </script>
 </head>
 <body>
  <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="floorController.do?doAdd" tiptype="3" >
					 
		<table style="" cellpadding="0" cellspacing="1" class="formtable">
				<tr>
					<td align="right">
						<label class="Validform_label">
							选择校区:
						</label>
					</td>
					<td class="value">
					    <t:CommonSelect url="expFieldSchoolController.do?select" callback="schoolLoded()"
					 			 name="schoolId" textField="schoolName" idField="id"></t:CommonSelect>
						<span class="Validform_checktip"></span>
						<label class="Validform_label" style="display: none;">校区名称</label>
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							选择楼号:
						</label>
					</td>
					<td class="value">
					     	<t:CommonSelect url="buildingController.do?select"  datatype="*"
					 			 name="buildingId" textField="buildingNumber" idField="id"></t:CommonSelect>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">楼号</label>
						</td>
				</tr>
				 
				<tr>
					<td align="right">
						<label class="Validform_label">
							楼层:
						</label>
					</td>
					<td class="value">
					     	<input id="floorNumber" name="floorNumber" type="text" 	maxlength="5" 	     	datatype="*"
					     	style="width: 150px" class="inputxt" onkeyup="this.value=this.value.replace(/\D/g,'')" >
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">楼层</label>
					</td>
				</tr>
			</table>
		</t:formvalid>
 </body>
 
 <script>
 	//校区下拉框加载完毕
 	function schoolLoded(){
 		reloadBuildingSelect();
 	}	
 
 	$('#schoolId').change(function(){
 		reloadBuildingSelect();
 	 
 	});
 	
 	function reloadBuildingSelect(){
 		var schoolId = $('#schoolId').val();
 		//重新刷新建筑id
 		buildingIdselect("&schoolId="+schoolId);
 	}
 </script>
 